class FlowerPotRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	FlowerPotRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return data; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		renderer->Draw(Box(Texture, Point3i(4, 4, 4), Point3i(6, 16 - 4, 6)).SetAll(Point2i((2 * 16) + 6, 6)));

		renderer->Draw(Box(Texture, Point3i(6, 6, 1), Point3i(5, 16 - 6, 10)).SetAll(Point2i((10 * 16) + 5, (11 * 16) + 10)).SetTop(Point2i((10 * 16) + 5, (11 * 16) + 5)));
		renderer->Draw(Box(Texture, Point3i(6, 6, 1), Point3i(5, 16 - 6, 5)).SetAll(Point2i((10 * 16) + 5, (11 * 16) + 10)).SetTop(Point2i((10 * 16) + 5, (11 * 16) + 10)));

		renderer->Draw(Box(Texture, Point3i(1, 6, 4), Point3i(5, 16 - 6, 6)).SetAll(Point2i((10 * 16) + 6, (11 * 16) + 10)).SetTop(Point2i((10 * 16) + 10, (11 * 16) + 6)));
		renderer->Draw(Box(Texture, Point3i(1, 6, 4), Point3i(10, 16 - 6, 6)).SetAll(Point2i((10 * 16) + 6, (11 * 16) + 10)).SetTop(Point2i((10 * 16) + 5, (11 * 16) + 6)));

		Colorb color(Colorb::White);
		Point2i texturePos;

		switch (block.Data)
		{
			case 1:
			default:
				texturePos = Point2i(12, 0);
				break;
			case 2:
				texturePos = Point2i(13, 0);
				break;
			case 3:
				texturePos = Point2i(15, 0);
				break;
			case 4:
				texturePos = Point2i(15, 3);
				break;
			case 5:
				texturePos = Point2i(15, 4);
				break;
			case 6:
				texturePos = Point2i(14, 1);
				break;
			case 7:
				texturePos = Point2i(12, 1);
				break;
			case 8:
				texturePos = Point2i(13, 1);
				break;	
			case 9:
				renderer->Draw(Box(Texture, Point3i(4, 12, 4), Point3i(6, 0, 6)).SetAll(Point2i((6 * 16) + 6, 4 * 16)));
				return;
			case 10:
				texturePos = Point2i(7, 3);
				break;
			case 11:
				texturePos = Point2i(8, 3);
				color = Colorb(73, 205, 51, 255);
				break;
		}

		renderer->Draw(Face(Point3f(2, 0, 2), Point3f(14, 0, 14), Point3f(14, 12, 14), Point3f(2, 12, 2), color, Texture, Point2i(texturePos.X * 16, texturePos.Y * 16), 16, 16));
		renderer->Draw(Face(Point3f(14, 0, 14), Point3f(2, 0, 2), Point3f(2, 12, 2), Point3f(14, 12, 14), color, Texture, Point2i(texturePos.X * 16, texturePos.Y * 16), 16, 16));
		renderer->Draw(Face(Point3f(2, 0, 14), Point3f(14, 0, 2), Point3f(14, 12, 2), Point3f(2, 12, 14), color, Texture, Point2i(texturePos.X * 16, texturePos.Y * 16), 16, 16));
		renderer->Draw(Face(Point3f(14, 0, 2), Point3f(2, 0, 14), Point3f(2, 12, 14), Point3f(14, 12, 2), color, Texture, Point2i(texturePos.X * 16, texturePos.Y * 16), 16, 16));
	}
};